package _8GuoLvQi.impl;

import _8GuoLvQi.Criteria;
import _8GuoLvQi.Person;

import java.util.ArrayList;
import java.util.List;

/**
 * @CriteriaFemale: 标准接口 的 实现类 女性
 * @author: ZBoHang
 * @time: 2021/9/7 15:32
 */
public class CriteriaFemale implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> persons) {
        List<Person> list = new ArrayList<>();
        for (Person person : persons) {
            if ("female".equalsIgnoreCase(person.getGender())) {
                list.add(person);
            }
        }
        return list;
    }
}
